//
//  YHViewController.m
//  YHKit
//
//  Created by yanHu on 04/12/2024.
//  Copyright (c) 2024 yanHu. All rights reserved.
//

#import "YHViewController.h"
#import <TYCyclePagerView.h>
#import <Masonry/Masonry.h>

@interface YHViewController ()

@end

@implementation YHViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"YHKitResource" ofType:@"bundle"];
    NSBundle *bundle = [NSBundle bundleWithPath:bundlePath];
    UIImage *image = [UIImage imageNamed:@"WechatIMG" inBundle:bundle compatibleWithTraitCollection:nil];
    
    TYCyclePagerView *pageView = [[TYCyclePagerView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 300)];
    pageView.backgroundColor = UIColor.orangeColor;
    [self.view addSubview:pageView];
    [pageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.mas_equalTo(self.view);
        make.height.mas_equalTo(300);
    }];
    
//    UIImage *image = [UIImage imageNamed:@"WechatIMG"];
    UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
    [self.view addSubview:imageView];
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view);
    }];
    
	// Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
